﻿using System;
using Microsoft.WindowsAzure.Storage.Table.DataServices;
using ApplicationBoilerplate.Logging;

namespace MvcForum.Hosting.Azure.Storage {

	public class LogEntry : TableServiceEntity {

		public LogEntry() { }
		public LogEntry(EventType type, String message, String exceptionText) {
			this.Message = message;
			this.Eventype = type.ToString();
			this.ExceptionMessage = exceptionText;

			this.RowKey = DateTime.UtcNow.ToString("o");
			this.PartitionKey = Guid.NewGuid().ToString();
		}

		public String Eventype { get; set; }
		public String Message { get; set; }
		public String ExceptionMessage { get; set; }
	}
}